package com.ygqh.baby.mapper;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.ygqh.baby.ao.AppType;
import com.ygqh.baby.ao.BusinessModule;
import com.ygqh.baby.ao.PayType;
import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.po.YgOrder;
import com.ygqh.baby.po.YgOrderPayment;
import com.ygqh.baby.po.YgOrderPaymentExample;

public interface YgOrderPaymentMapper {
	int countByExample(YgOrderPaymentExample example);

	int deleteByExample(YgOrderPaymentExample example);

	int deleteByPrimaryKey(Long id);

	int insert(YgOrderPayment record);

	int insertSelective(YgOrderPayment record);

	List<YgOrderPayment> selectByExample(YgOrderPaymentExample example);

	YgOrderPayment selectByPrimaryKey(Long id);

	int updateByExampleSelective(@Param("record") YgOrderPayment record, @Param("example") YgOrderPaymentExample example);

	int updateByExample(@Param("record") YgOrderPayment record, @Param("example") YgOrderPaymentExample example);

	int updateByPrimaryKeySelective(YgOrderPayment record);

	int updateByPrimaryKey(YgOrderPayment record);

	int countSuper(@Param("q") String q);

	List<YgOrderPayment> selectSuper(@Param("queryInfo") QueryInfo queryInfo, @Param("q") String q);

	YgOrder selectOrderByPaymentCode(@Param("paymentCode") String paymentCode, @Param("paid") Boolean paid, @Param("businessModule") BusinessModule businessModule);

	int updatePaySuccess(@Param("paymentCode") String paymentCode, @Param("tradeNo") String tradeNo, @Param("appType") AppType appType,
			@Param("payType") PayType payType, @Param("paidPrice") BigDecimal paidPrice, @Param("paidTime") Date paidTime);

}
